package service.impl;

import java.util.List;

import dao.UserDao;
import dao.impl.UserDaoImpl;
import entity.User;
import entity.User_Inf;
import service.UserService;

public class UserServiceImpl implements UserService {
	private UserDao ud = new UserDaoImpl();

	@Override
	public boolean queryUserByLoginNameAndPassword(String loginName, String password) {
		User user = ud.queryUserByLoginNameAndPassword(loginName, password);
		if (user != null) {
			return true;
		}
		return false;
	}

	@Override
	public User queryUserByName(String username) {
		return ud.queryUserByName(username);
	}

	@Override

	public List<User> selectAllUser() {
		
		return ud.selectAllUser();
	}

	@Override
	public boolean savaUser(User user) {
		 
		return  ud.savaUser(user);
	}
	public User_Inf queryUserByUsername(String userName) {
		return ud.queryUserByUsername(userName);

	}

	@Override
	public boolean saveUserOtherInfo(User_Inf user_inf) {
		
		return ud.saveUserOtherInfo(user_inf);
	}

}
